﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;

namespace blackhouse.Web {
	public class ByteImageWatermark : ImageWatermark {

		#region Fields

		private byte[] imageData;

		#endregion

		#region Constructors

		public ByteImageWatermark(byte[] imageData, float percentWidth, float percentHeight, float percentPositionX, float percentPositionY)
			: base(percentWidth, percentHeight, percentPositionX, percentPositionY) {
			this.imageData = imageData;
		}

		#endregion

		#region Methods

		public override Stream GetImageStream() {
			MemoryStream mst = new MemoryStream();
			mst.Write(this.imageData, 0, this.imageData.Length);
			return mst;
		}

		#endregion

	}
}